#include "IWindow.h"

IWindow::IWindow()
	: m_visible(false),
	m_window(NULL)
{
	m_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_decorated(GTK_WINDOW(m_window), FALSE);
}

IWindow::~IWindow()
{
	if(m_window)
		delete m_window;
}

GtkWidget* IWindow::getWindow()
{
	return m_window;
}

void IWindow::show()
{
	if(!m_visible)
	{
		gtk_widget_show_all(m_window);
		m_visible = true;
	}
}

void IWindow::hide()
{
	if(m_visible)
	{
		gtk_widget_hide_all(m_window);
		m_visible = false;
	}
}

bool IWindow::isVisible()
{
	return m_visible;
}